<html>
    <head>
        <title>Strona Logowania</title>
    </head>
    <body>
        <h1>Zaloguj do sklepu</h1>
        <%
        String username = (String)session.getAttribute("username");
        
        if(username != null)
        {
             response.sendRedirect("main.jsp");
        }
        else 
        {
        %>
        <form action="checkLogin.jsp">
			<table>
				<tr>
  					<td> Login  : </td>
                    <td> <input id="login" name="username" size=20 type="text" /> </td> 
				</tr>
				<tr>
					<td> Haslo  : </td>
					<td> <input id="password" name="password" size=20 type="password" /> </td> 
				</tr>
			</table>
			<input id="loginButton" type="submit" value="login" />
		</form>
		<% 
		}              
		%>         
    </body>
</html> 
